package net.sx.minemodule.mvp.presenters;

import com.alibaba.fastjson.JSON;
import com.kedll.library.mvp.AbstractRefreshPresenter;
import com.kedll.library.mvp.RefreshingView;

import net.sx.minemodule.MineApiUtils;
import net.sx.minemodule.mvp.bean.InviteBean;

import java.util.List;

public class MineInvitePresenter extends AbstractRefreshPresenter {

    public MineInvitePresenter(RefreshingView mView) {
        super(mView);
    }

    @Override
    protected void fetchData(boolean isLoadMore) {
        MineApiUtils.getMyinviteList(subModelList -> {
            List<InviteBean> list = JSON.parseArray(subModelList.getItems(), InviteBean.class);
            parserData(isLoadMore, list);
        }, throwable -> {

        });
    }
}
